From faf0beede02932923290ac3d69eb5102f2ca72c2 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Wed, 7 Apr 2010 15:07:05 +0200 Subject: [PATCH] FileChooser: Initialize search engines on demand We postpone initialization of the search engines until it's really needed. See bug 614971 for reference. --- gtk/gtkfilechooserdefault.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 1d60429986..429e8c4df0 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -228,15 +228,6 @@ enum { GTK_TREE_MODEL_ROW, }; -static gboolean -search_is_possible (GtkFileChooserDefault *impl) -{ - if (impl->search_engine == NULL) - impl->search_engine = _gtk_search_engine_new (); - - return impl->search_engine != NULL; -} - /* Interesting places in the shortcuts bar */ typedef enum { SHORTCUTS_SEARCH, @@ -2266,10 +2257,7 @@ shortcuts_model_create (GtkFileChooserDefault *impl) G_TYPE_BOOLEAN, /* pixbuf cell visibility */ G_TYPE_POINTER); /* GCancellable */ - if (search_is_possible (impl)) - { - shortcuts_append_search (impl); - } + shortcuts_append_search (impl); if (impl->recent_manager) { -- 2.30.2